/**
 * @ClassName Test03
 * @Description 求阶乘
 * @Author 李明忠
 * @Date 2025/5/14 20:49
 * @Version 1.0
 */
public class Test03 {

    public static void main(String[] args) {
        System.out.println(func(5));
    }

    public static int func(int a) {
        int ret = 0;
        for (int i = 1; i <= 5; i++) {
            ret += fun(i);
        }
        return ret;
    }

    public static int fun(int n) {
        int ret = 1;
        for (int i = 1; i <= n; i++) {
            ret *= i;
        }
        return ret;
    }
}
